package com.taotao.protal.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.taotao.protal.service.ContentService;

@Controller
public class IndexController {
	
	@Autowired
	private ContentService contentService;//请求商品分类service
	
	//请求的后缀名是html是不能返回java对象的,
	@RequestMapping("/index")
	public String showIndex(Model model){
		String adJson = contentService.getContentList();
		model.addAttribute("ad1", adJson);
		return "index";
	}
}
